Passed
Push — main ( fac3c3...502827 )
by Stefan
02:24
created

FormSelect.js ➔ resetInput   A

Complexity

Conditions 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 2
1
function onInsertDateTimeUser(id, strUsername)
2
{
3
    let oEdit = document.getElementById(id);
4
    if (oEdit) {
5
        let date = new Date();
6
        let strValue = oEdit.innerHTML = date.toLocaleString();
7
        if (strUsername != '') {
8
            strValue += ' / ' + strUsername;
9
        }
10
        oEdit.value = strValue;
11
    }
12
}
13
14
function onDatePicker(id)
0 ignored issues
show
Unused Code introduced by
The parameter id is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
15
{
16
}
17
18
function onTimePicker(id)
0 ignored issues
show
Unused Code introduced by
The parameter id is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
19
{
20
}
21
22
function resetInput(id)
23
{
24
    let oEdit = document.getElementById(id);
25
    if (oEdit) {
26
        oEdit.value = '';
27
    }
28
}
29